# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit gnome2-utils
DESCRIPTION="Psensor is a graphical hardware monitoring application for Linux."
SRC_URI="https://wpitchoune.net/psensor/files/${P}.tar.gz"
SLOT=0
IUSE="man doc appindicator libnotify atasmart server X"
KEYWORD=""
RDEPEND="sys-apps/lm_sensors
	x11-libs/gtk+:3
	libnotify? ( x11-libs/libnotify )
	appindicator? ( dev-libs/libappindicator )
	dev-libs/json-c
	sys-apps/lm_sensors:0/4.0.0
	gnome-base/libgtop:2
	atasmart? ( dev-libs/libatasmart )
	server? ( net-libs/libmicrohttpd )
	"
DEPEND=$RDEPEND"man? ( sys-apps/help2man )
	doc? ( dev-ruby/asciidoctor )"
src_configure() {
	econf \
		$(use_with X x)
}
pkg_preinst() { 
   gnome2_icon_savelist 
   gnome2_schemas_savelist 
} 

pkg_postinst() { 
   fdo-mime_desktop_database_update 
   gnome2_icon_cache_update 
   gnome2_schemas_update 
} 

pkg_postrm() { 
   fdo-mime_desktop_database_update 
   gnome2_icon_cache_update 
   gnome2_schemas_update 
}
